package ljl.alg.wangzheng_camp.round1.tree;

public class _559_ntree_depth {
    
    public int maxDepth(Node root) {
        if (root == null) return 0;
        int max = 0;
        if (root.children != null) {
            for (Node child : root.children) {
                max = Math.max(maxDepth(child), max);
            }
        }
        return max + 1;
    }
}
;
